package com.lizeng.manage.pojo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * 权限
 * 
 * @author 符冬
 * 
 */
@Entity
public class Jurisdiction implements Serializable {
	private static final long serialVersionUID = -817655275536901780L;

	// 权限值
	@Id
	@Column(length = 40)
	private String actionValue;
	// 权限名称
	@Column(length = 30, nullable = false)
	private String actionName;
	// 模块值
	@Column(length = 30)
	private String moduleValue;

	public void setActionValue(String actionValue) {
		this.actionValue = actionValue;
	}

	public String getActionValue() {
		return actionValue;
	}

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}

	public String getModuleValue() {
		return moduleValue;
	}

	public void setModuleValue(String moduleValue) {
		this.moduleValue = moduleValue;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((actionValue == null) ? 0 : actionValue.hashCode());
		result = prime * result
				+ ((moduleValue == null) ? 0 : moduleValue.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Jurisdiction other = (Jurisdiction) obj;
		if (actionValue == null) {
			if (other.actionValue != null)
				return false;
		} else if (!actionValue.equals(other.actionValue))
			return false;
		if (moduleValue == null) {
			if (other.moduleValue != null)
				return false;
		} else if (!moduleValue.equals(other.moduleValue))
			return false;
		return true;
	}

}
